SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.AgentesDNIDuplicado
AS
SELECT     Documento, COUNT(idAgente) AS Expr1
FROM         dbo.tb_Agentes
GROUP BY Documento
HAVING      (COUNT(idAgente) > 1)
GO
